import ajax from './ajax'

import mAjax from './mAjax'

//请求首页header导航数据
export const reqHomeNavList = () => ajax.get('/nav')

//请求首页推荐页轮播图数据
export const reqHomeSwiperList = () => ajax.get('/banner')

//请求首页推荐页分类列表的数据
export const reqHomeClassList = () => ajax.get('/classlist')

// 请求首页推荐产品分类大图的数据
export const reqProductClassList = () => mAjax.get('/productclass')

//请求首页推荐页手机详情
export const reqPhoneDetailList = () => ajax.get('/shopdetail')

//请求首页智能页面的轮播图数据
export const reqIntelligenceSwiperList = () => ajax.get('/genceswiper')

// 请求首页智能页面的分类数据
export const reqIntelligenceProductClassList = () => ajax.get('/genceproductclass')

// 请求首页智能页面商品详情
export const reqIntelligenceProductDetailList = () => ajax.get('/genceproductdetail')

//请求首页电视页面商品详情
export const reqTelevisionDetailList = () => ajax.get('/televisondetail')

//请求首页家电页面的分类数据
export const reqIntelliHouseHold = () => ajax.get('/appliances')

export const reqCategory = ()=> ajax.get("/category")
export const reqSearch = () => ajax.get('/search')
export const reqSearchList = () => ajax.get('/searchlist')

//获取详情页的轮播图数据
export const reqDetailSwiper = () => ajax.get('/shopdetail')
//获取手机颜色详情
export const reqDetailColor = () => ajax.get('/shopdetail')
//获取对应的id的手机信息
export const reqDetailPhone = () => ajax.get('./shopdetail')

// 获购物车详情
export const reqShopCart = () => ajax.get('/cartdetail')

//用于请求登录
export const reqLogin = (loginParams) => ajax.post('/user/passport/login',loginParams)
//用于请求用户信息（无需携带任何参数，因为token已经放在了请求头中，所有的请求都已经带着token了）
export const reqUserInfo = ()=> ajax.get('/user/passport/auth/getUserInfo')
//用于请求验证码
export const reqVerifyCode = (phone) => ajax.get(`/user/passport/sendCode/${phone}`)
//用于请求注册(params是参数对象，里面包含着：phone、password、code)
export const reqRegister = (params) => ajax.post('/user/passport/register',params)


